package com.kdd.campus.sh.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/****
 * @Author:shenkunlin
 * @Description:ShComment构建
 * @Date 2019/6/14 19:13
 *****/
@ApiModel(description = "ShComment",value = "ShComment")
@Table(name="sh_comment")
@Data
@Builder
public class ShComment implements Serializable{

	@ApiModelProperty(value = "")
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	private Long id;//

	@ApiModelProperty(value = "")
    @Column(name = "productId")
	@NotNull
	private Long productId;//

	@ApiModelProperty(value = "")
    @Column(name = "userId")
	@NotNull
	private Long userId;//

	@ApiModelProperty(value = "//回复评论的id(给那条评论回复)")
    @Column(name = "replay_commentId")
	private Long replayCommentId;//回复评论的id(给那条评论回复)

	@ApiModelProperty(value = "评论内容,使用Base64进行加密")
    @Column(name = "content")
	@NotBlank
	private String content;//评论内容,使用Base64进行加密

	@ApiModelProperty(value = "groupNum相同则说明评论在同一个组中,在回复评论中使用")
    @Column(name = "groupNum")
	private String groupNum;//groupNum相同则说明评论在同一个组中,在回复评论中使用

	@ApiModelProperty(value = "是否是同一组评论中的第一条")
    @Column(name = "isFirst")
	private Boolean isFirst;//是否是同一组评论中的第一条

	@ApiModelProperty(value = "0:删除 1:显示")
    @Column(name = "status")
	private Integer status;//0:删除 1:显示

	@ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
	private Date createTime;//创建时间



}
